<?php

function my_page_str ($prefix = ', ', $postfix = '') {
    $paged = (get_query_var ('paged') ? (int) get_query_var ('paged') : 1);
    return ($paged > 1 ? $prefix . __ ('Page') . ' ' . $paged . $postfix : '');
}

/* WICHTIG: In der header.php des Themes muss wp_title(''); notiert sein! */

function my_title ($str) {
    $title = trim ($str);
    $postfix = ' | ' . get_bloginfo ('name');
    if (is_single() || is_page()) { 
	return $title . $postfix; 
    } elseif (is_home () || is_front_page ()) {
	$title = get_bloginfo ('description');
    } elseif (is_category ()) {
	$title = __ ('Category') . ' ' . $title;
    } elseif (is_archive ()) {
	$title = __ ('Archives') . ' ' . $title;
    }
    return $title . my_page_str () . $postfix;
}
add_filter ('wp_title', 'my_title');

?>
